package com.linkhub.oms.data.sync.api.account.domain.response;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.io.Serializable;
import java.util.Map;
import java.util.Objects;

/**
 * 汇率response
 *
 * @author Frank
 */
@Data
public class ExchangeRateResponse implements Serializable {

    /**
     * result
     */
    @JSONField(name = "result")
    private String result;

    @JSONField(name = "conversion_rates")
    private Map<String, String> conversionRates;


    /**
     * 是否成功
     */
    public boolean isSuccess() {
        return Objects.equals("success", this.getResult());
    }

}